import request from '@/utils/request'

// 查询景点片区列表
export function listTouristAddrArea(query) {
  return request({
    url: '/app/touristAddrArea/list',
    method: 'get',
    params: query
  })
}

export function listTouristArea(query) {
  return request({
    url: '/app/touristAddrArea/areaList',
    method: 'get',
    params: query
  })
}

// 查询景点片区详细
export function getTouristAddrArea(addrCode) {
  return request({
    url: '/app/touristAddrArea/' + addrCode,
    method: 'get'
  })
}

// 新增景点片区
export function addTouristAddrArea(data) {
  return request({
    url: '/app/touristAddrArea',
    method: 'post',
    data: data
  })
}

// 修改景点片区
export function updateTouristAddrArea(data) {
  return request({
    url: '/app/touristAddrArea',
    method: 'put',
    data: data
  })
}

// 删除景点片区
export function delTouristAddrArea(addrCode) {
  return request({
    url: '/app/touristAddrArea/' + addrCode,
    method: 'delete'
  })
}
